package top.hcode.hoj.controller.oj;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.hcode.hoj.annotation.AnonApi;
import top.hcode.hoj.common.result.CommonResult;
import top.hcode.hoj.pojo.entity.problem.Tag;
import top.hcode.hoj.pojo.entity.problem.TagClassification;
import top.hcode.hoj.service.oj.TagService;

import java.util.List;

/**
 * @author orangej
 * @since 2024/12/17
 */
@RestController
@RequestMapping("/api")
public class TagController {
    @Autowired
    private TagService tagService;

    @AnonApi
    @GetMapping("/get-tag-list")
    public CommonResult<List<Tag>> getTagList() {
        return CommonResult.successResponse(tagService.getTagList());
    }

    @AnonApi
    @GetMapping("/get-tag-classification-list")
    public CommonResult<List<TagClassification>> getTagClassificationList() {
        return CommonResult.successResponse(tagService.getTagClassification());
    }
}
